JavaScript

{grid.object}getValue Method

Syntax

{grid.Object}.getValue(part,name,row - omit for Search and Detail View part)

Arguments

part

'G' , 'D' or 'S' (Grid, Detail View or Search part). MUST be all UPPERCASE

row

Only needed for Grid part.

name

MUST be all UPPERCASE

Description

Get the value of a control in the Grid, Search or Detail View part.

Part is 'G' , 'D' or 'S' (Grid, Detail View or Search part). Row is only needed for Grid part. For new record rows, row is negative. IMPORTANT:The 'name' and 'part' parameters MUST be all UPPERCASE.

Example

IMPORTANT NOTE ABOUT USING .getValue() on a Range field in the Search Part - You cannot use this method for a field in the Search Part that has been configured as a 'Range' search.Read value in 'LASTNAME' field from the Grid part, row 4. Note that field name must be uppercase.

var lname = {grid.object}.getValue('G','LASTNAME',4);

read value in 'LASTNAME' field from the Grid part, 'current row'. Note that field name must be uppercase.

var lname = {grid.object}.getValue('G','LASTNAME',{grid.rowNumber});

Note that {grid.rowNumber} cannot be used in client-side Javascript or Global Javascript functions.Instead, you must use the _selectedRow property of the Grid object to get the current row. For example:

var rn = {grid.object}._selectedRow;
var lname = {grid.object}.getValue('G','LASTNAME',rn);

Read value in 'LASTNAME' field in the Search part.

var lname = {grid.object}.getValue('S','LASTNAME');

read value in 'LASTNAME' field in the Detail View part.

var lname = {grid.object}.getValue('D','LASTNAME');

Getting value of 'range' fields in the Search part. You can't use .getValue(). You have to use low level Javascript.

var val1 = $('{grid.componentname}.S.STARTDATE').value;
var val2 = $('{grid.componentname}.S._TO.STARTDATE').value;

See Also